home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / strategy / xpuzzles.3 / xpuzzles / xpuzzles-5.3.1 / xskewb / README < prev    next >
Text File  |  1996-04-08  |  9KB  |  213 lines

  1.     X-BASED SKEWB
  2.     =============    Skewb X widgets, V5.3
  3.  
  4.  
  5.     It has been tested on the following platforms:
  6.  
  7.     HP 3xx & 700        HP-UX 9.0x    X11R5
  8.     Sun4, SPARC        SunOS 4.1.3    X11R4
  9.     Sun4, SPARC        SunOS 5.4    X11R5
  10.     PC, 486            Linux 1.0.9    X11R5(*)
  11.     PC, 486            Linux 1.2.8    X11R6(**)
  12.  
  13.     *    Keypad 5 key may not work, in which case, try it with the
  14.     Num-Lock on
  15.     **    Keypad may not work, since various keycodes may not be defined
  16.     by default.  Check that "KP_1 - KP_9, Home, Up, Prior, Left,
  17.     Begin, Right, End, Down, Next" are defined towards the end of
  18.     /usr/lib/X11/etc/xmodmap.std .  If not defined
  19.     cp /usr/lib/X11/etc/xmodmap.std /usr/lib/X11/xinit/.Xmodmap
  20.     and then motify this or create your own at ${HOME}/.Xmodmap .
  21.     You should just have to uncomment them (get rid of some '!').
  22.     This should be done before X is started.
  23.  
  24.     If yours is not in this list, please let me know -- thanks. The
  25.     most updated source could be found on ftp.x.org under
  26.     /contrib/games/puzzles.
  27.  
  28. HOW TO BUILD?
  29.  
  30.     Do you have Motif?  If so, uncomment line 28 of Imakefile.
  31.  
  32.     It should be easy. Edit the Imakefile (or Makefile.std, see below)
  33.     for appropriate settings of variable SCOREFILE, then do:
  34.     xmkmf
  35.     make
  36.     xskewb  [motif version will be xmskewb]
  37.  
  38.     Note: if you don't have 'xmkmf' or the "Makefile" it generates
  39.     doesn't work well, edit Makefile.std for appropriate settings for
  40.     XINCLUDEPATH and XLIBPATH, then try:
  41.     make -f Makefile.std
  42.     xskewb
  43.  
  44.     or if you have Motif, uncomment appropriate sections, then try:
  45.     make -f Makefile.std all.xm
  46.     xmskewb
  47.  
  48.     You should have Skewb.ad copied to $(HOME)/Skewb or 
  49.     /usr/lib/X11/app-defaults/Skewb to run, especially if the background
  50.     is similar to one of the faces. Edit this file for your preferences.
  51.     You might want to move xskewb into /usr/bin/X11 (or wherever your
  52.     X binaries are).
  53.     You might also want to move xskewb.man to /usr/man/man6/xskewb.6
  54.  
  55. ANYTHING SPECIAL IN USING?
  56.  
  57.     Click on the left mouse button to move a piece.  Release it on
  58.       adjacent piece on the same face.  (Click on the diamonds are
  59.       ignored).  The puzzle will then turn towards where the mouse
  60.       button was released.
  61.     Click on the middle mouse button toggle the practice mode. (This is
  62.       good for learning moves).  Also 'P' or 'p' does the same thing.
  63.       One must double click on the middle mouse button if the puzzle is
  64.       being worked on.
  65.     Click on the right mouse button if you want to randomize the puzzle.
  66.       Also 'R' or 'r' does the same thing.  One must double click on
  67.       the right mouse button if the puzzle is being worked on.
  68.     'O' or 'o' to toggle orient mode. (I prefer the orient mode since
  69.       it is slightly more challenging).
  70.     'S' or 's' to auto-solve.  Unfortunately, its unimplemented.
  71.     'U' or 'u' to undo last move.
  72.     'G' or 'g' to get a saved puzzle.
  73.     'W' or 'w' to write or save a puzzle.
  74.     'Q', 'q', or Control-C to kill program.
  75.  
  76.     Key pad is defined for 2d skewb as:
  77.         /
  78.  
  79.     7   8   9
  80.         ^
  81.     4 < 5 > 6
  82.         v
  83.     1   2   3
  84.  
  85.     The key pad along with the use of the mouse will allow you to move the
  86.     cube i.e.,
  87.                       KP_DIVIDE=>CCW
  88.     KP_7=>TopLeft     KP_8=>Top       KP_9=>TopRight
  89.     KP_3=>Left        KP_5=>CW        KP_6=>Right                  
  90.     KP_1=>BottomLeft  KP_2=>Bottom    KP_3=>BottomRight
  91.     Note: Top, Left, Right, and Bottom only work when the control key
  92.     is pressed and there is no analog for the 3d skewb.
  93.  
  94.     If the mouse is on a diamond, the above "KP" keys will not move cube
  95.     because the move is ambiguous. Also if the mouse is on a triangle, not
  96.     all the "KP" keys will function because the puzzle will only rotate on
  97.     the cuts, i.e. a triangle with a TL-BR cut will rotate only TL & BR, a
  98.     triangle with a TR-BL cut will rotate only TR & BL. Therefore, a
  99.     triangle can only move tangential to the center of the face. No doubt
  100.     this is confusing, but the physical skewb is the same way. In fact,
  101.     that is part of its appeal.
  102.  
  103.     Key pad for 3d skewb, use your intuition (is this a cop out or what?).
  104.     The key pad is defined differently depending on which side of the cube
  105.     your mouse is pointing at. Again, the cube can not turn pointing at
  106.     center diamonds. One thing that stays the same is KP_5=>CW.
  107.  
  108.     The control key allows you to move the whole cube at once without
  109.     being entered as a move.  Hold down the control key while using the
  110.     left mouse button or the keypad.
  111.  
  112.     One has to orient the faces in orient mode, besides getting all the
  113.     faces to be the same color. To do this one has to get the lines to
  114.     be oriented in the same direction, this only matters with center
  115.     diamond. This does add complexity so there are 2 sets of records.
  116.  
  117.     Try resizing the cube. Notice the puzzle resizes to take advantage
  118.     of the "room" available.
  119.  
  120.     The title is in the following format (non-motif version):
  121.     xskewb{2|3}d: (<Number of moves>/\
  122.         {<Record number of moves>|NEVER|PRACTICE}) - <Comment>
  123.     {2|3}: current dimensional view
  124.     {<Record...}: puzzle is either in practice mode or record mode
  125.        In record mode, if there is no record of the current puzzle, it
  126.        displays "NEVER".
  127.  
  128.     If you were looking for a auto-solver, sorry.  If you know of one
  129.     let me know.
  130.  
  131.     Also a tesseract (4D cube) would be nice. (Does such an analog exist
  132.     for 4d?)
  133.  
  134.     Personally, I have solved this puzzle, but only physically, never in
  135.     software. The biggest handicap is that the puzzle is hard to follow
  136.     through the diagonals. But the real one is like that too.
  137.  
  138.     Recently, Disney released Mickey's Challenge, its a spherical skewb
  139.     with a pretty good internal mechanism. It also comes with a pretty
  140.     neat book. The whole package is only about $10.
  141.      
  142.     Refer to the man page for detailed command line options.
  143.  
  144.     If you want further information on puzzles, I'll be glad :-) to send
  145.     it to you.
  146.  
  147. SAVE FORMAT
  148.  
  149.     The format is not standard.  The reason is that this is simple to
  150.     produce.  The format will probably change to become more readable.
  151.     Consider the 2d cross representation:
  152.  
  153.     orient: 0 false, 1 true  lines on cube to be oriented
  154.     practice: 0 false, 1 true
  155.     moves: 0-MAXINT
  156.  
  157.     startingPosition:
  158.       0       R     where the starting unrandomized faces would be,
  159.     1 2 3   Y W G   each face has 4 corners
  160.       4       O     if orient mode, orientation number follows face number
  161.       5       B       0 up, 1 right, 2 down, and 3 left.
  162.  
  163.     This is then followed by the moves
  164.     move #: face corner direction control
  165.       each turn is with respect to a corner on a face.  The corners
  166.       start at the upper right and work clockwise.
  167.     Direction is represented as 0 upper right, 1 lower right, 2 lower
  168.       left, 3 upper left, 5 clockwise, 7 counterclockwise, 8 up, 9 right,
  169.       10 down, and 11 left.
  170.     Control is represented as 0 or 1, 1 if the whole cube is moved at once
  171.       (here i and j do not matter), 0 if not.  The xskewb record keeper
  172.       does not count a control move as a move, but here we do.
  173.  
  174.     Caution: the program may crash on corrupted input.
  175.  
  176. FOUND A BUG?
  177.  
  178.     Send bugs reports and fixes to the author. For bugs, please include
  179.     as much information as to their location as possible, since I may not
  180.     have the resources to duplicate the them.
  181.  
  182.     David Albert Bagley,    bagleyd@hertz.njit.edu
  183.  
  184. HISTORY
  185.  
  186.   [Apr 08, 96]    V5.3: Minor changes.
  187.   [Jan 31, 96]    V5.2: Puzzle can now moved by a more intuitive drag and
  188.         drop approach.  Pieces will invert, when selected.
  189.         New orthogonal moves make the turning more intuitive.
  190.   [Dec 15, 95]    V5.1: Minor updates, RNG for 32/64 bit, border color
  191.         to make faces look more realistic.
  192.   [Oct 06, 95]    V5.0: Xt/Motif, your choice.
  193.   [May 16, 95] V4.10: Warnings removed from Sun's cc and lint and now
  194.         include a random number generator.  New control key moves
  195.         added for the 2D version.
  196.   [Mar 13, 95]    V4.6: Removed lint warnings and added a VMS make.com .
  197.   [Nov 11, 94]    V4.5: Conservative guess for random number generator.
  198.   [Oct 02, 94]    V4.4: Now allows undos, saves, and recalls.
  199.   [Jun 28, 94]    V4.3: More reuse of code between 2D & 3D, can accommodate
  200.         a auto-solver.
  201.   [Jun 15, 94]    V4.2: Mistakenly used a Boolean variable in an array.
  202.   [Jun 02, 94]    V4.1: R6.
  203.   [May 30, 94]    V4.0: Xt version.
  204.         I got some good ideas from oclock.
  205.   [Oct 14, 93]    V3.0: Motif version.
  206.         I got some good ideas from Douglas A. Young's
  207.         book: "The X Window System Programming and Applications
  208.         with Xt OSF/Motif Edition", particularly his dial widget.
  209.         I got some good ideas on presentation from Q. Zhao's
  210.         tetris.
  211.   [Jan 22, 92]    V2.0: XView version.
  212.   [Mar 19, 91]    V1.0: SunView version.
  213.